﻿@{
    ViewBag.Title = "Common Command";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
        <ol class="breadcrumb">
    <li><a href="/Home.html">Home</a></li>
    <li><a href="/WebApp/WebApi"> Sanelib WebApp</a></li>
    <li class="active">Health</li>
</ol>
     
            
            <div id="introduction">
                <h1 class="text-left">ControllerApis</h1>
                <h4>HealthController</h4>
            </div>
            <div>
                <h3>Class Inherited : SmartApiController</h3>
                <table class="table-condensed table-striped">
                    <tr>
                        <th>Constructor</th>
                        <th>Parameters</th>
                    </tr>
                    <tr>
                        <td class="table-bordered">IUserSession</td>
                        <td class="table-bordered">IMapingEngine</td>
                        <td class="table-bordered">IHealthViewRepository</td>
                    </tr>
                </table>
                <p>
                    Where, IUserSession and IMappingEngine Local Variable are assigned to a Instance Variable form the <b>base</b> of <a href="/WebApp/SmartApi" class="btn-link">SmartApiController</a><br />
                    <b>IHealthViewRepository</b> is the interface where to declare the Array type HealthData() of the HealthView this is interface is also implement of the <b>IViewRepository</b> from the Sanelib library
                </p>
                <ol id="method">
                    <li>
                        <b>Get() :</b>Where the get the details of the health from the "Health" Table.
                        <pre><code>
public HttpResponseMessage Get()
{
    var healthView = _healthViewRepository.HeathData();
    var response = new HealthResponse
    {
        Value = healthView.Select(Mapper.Map&lt;HealthView, HealthResponse.HealthLine&gt;).ToArray()
    };
    return Content(response);
}
</code></pre>
                        <p>
                            where, the HealthData() is defined into the <b>IHealthViewRepository</b> when called it's also called the <b>HelthViewRepository</b> where to select the Top 60 record From the "Health" Table<br />
                            and the all Record are Stored into the <b>Value</b> from the Mapping Of the <b>HealthView</b> and the <b>HealthResponse</b>
                            at the end to return the Content to the <a href="./SmartApiController.html" class="btn-link">SmartApiController</a>
                        </p>
                    </li>

                </ol>
            </div>
       